home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / programming / oracle7 7.2 / DB / RDBMS72 / RDBMS72.INS < prev    next >
Encoding:
Text File  |  1995-10-10  |  6.8 KB  |  244 lines

  1. /* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
  2.  
  3. /**************************************************************************** 
  4.   NAME
  5.     rdbms72.ins - Windows 95 V3 installation script for the Personal
  6.           Oracle7 RDBMS.
  7.  
  8.   DESCRIPTION
  9.     This script installs the Personal Oracle7 RDBMS by copying the appropriate
  10.     files and optionally creating a new database by using a "seed" database.
  11.  
  12.   OWNER
  13.     Tony Rodgers
  14.  
  15.   MODIFIED    DD-MMM-YY Reason
  16.    LMurphy     06/13/95 - Modified for 7.2/Windows 95
  17.    LMurphy     11/29/94 - modified NT RDBMS script for Personal Oracle7
  18.    syau        07/01/94 - 7.1.3
  19.     HA!        04/28/94 - 7.1.2 and 3.0.10.2
  20.    Hartenstine 04/20/93 - WIN_NT: Adapt to Windows NT
  21.     Colello    10/09/92 - DESKTOP: copy demo and doc files AND add
  22.                  DBA_AUTHORIZATION
  23.     trodgers  01-APR-92 Created.
  24. *****************************************************************************/
  25. {
  26.   /************************************************************************** 
  27.         Start main logic...                               
  28.    **************************************************************************/
  29.   if (doit)
  30.     {
  31.  
  32.       bmp_home = directory_name(current_script);
  33.       { ui_graphics("%bmp_home%\database.bmp"); }
  34.       [ 'DEFAULT: continue(); ]
  35.  
  36.       ins_ratchet = "7.2.2.3.1";
  37.  
  38.       execute("%installer_home%\win95.ins");
  39.  
  40.       install(w95rsf72);
  41.       install(w95util72);
  42.  
  43.       ui_product(product_label);             
  44.  
  45.       permit_retry_operations = TRUE;        
  46.  
  47.       ui_action(instantiate(installing_scripts));
  48.       copy(deinstl);
  49.       ui_action(instantiate(installing_executables));    
  50.       copy(exec, vsn);
  51.       copy(doc);
  52.       copy(help);
  53.       copy(init);
  54.  
  55.       ui_action(instantiate(installing_dlls));
  56.       copy(dll, vsn);
  57.       copy(twotask);
  58.       copy(res, nls_abbreviation);
  59.  
  60.       ui_action(instantiate(installing_msg));    
  61.       copy(msg, nls_abbreviation);
  62.  
  63.       ui_action(instantiate(installing_sql));
  64.       copy(sql);
  65.  
  66.       ui_action(instantiate(modifying_config));
  67.       if (set_rdbms72)
  68.       {
  69.         modify("RDBMS72",rdbms72,ora_config,(product_filename(w95rsf72)));
  70.       }
  71.  
  72.       modify("RDBMS_FILES",rdbms_files,ora_config,(product_filename(current_product)));
  73.       modify("ORACLE_SID","orcl",ora_config,(product_filename(current_product)));
  74.  
  75. /* Backup and Recovery registry items */
  76.  
  77.       if (set_mshelp)
  78.       {
  79.            ui_action(instantiate(modifying_config));
  80.        modify("MSHELP",mshelp,ora_config,(product_filename(current_product)));
  81.       }
  82.  
  83.  
  84.       modify("MSHELP_TOOLS",mshelp,ora_config,(product_filename(current_product)));
  85.       modify("VS10","%oracle_home%\BIN",ora_config,(product_filename(current_product)));
  86.       modify("RDBMS72_CONTROL",rdbms_files,ora_config,(product_filename(current_product)));
  87.       modify("RDBMS72_ARCHIVE","%rdbms72%\ARCHIVE",ora_config,(product_filename(current_product)));
  88.  
  89.  
  90.       bmp_home = directory_name(current_script);
  91.       { ui_graphics("%bmp_home%\repdb.bmp"); }
  92.       [ 'DEFAULT: continue(); ]
  93.  
  94.       if (install_seed_database)
  95.       {
  96.     copy_seed = TRUE;
  97.     modify("DATABASE_STARTUP","",ora_config,(product_filename(current_product)));
  98.     modify("LISTENER_STARTUP","",ora_config,(product_filename(w95netsrv22)));
  99.     ui_action(instantiate(installing_seed));
  100.         if (new_seed_path)
  101.     {
  102.         { make_directory("%rdbms_home%"); }
  103.         [ 'INVALID_FILE_NAME, 'PERMISSION_ERROR, 'FILE_NOT_FOUND, 'WRITE_ERROR, 'OS_ERROR:
  104.           {
  105.             copy_seed = FALSE;
  106.                         information_dialog(new_seed_dir_failed);
  107.           }
  108.         ]
  109.         if (copy_seed)
  110.         {
  111.             copy(seed, db_type);
  112.         }
  113.     }
  114.     else
  115.     {
  116.         copy(seed, db_type);
  117.     }
  118.  
  119.     permit_retry_operations = FALSE;
  120.  
  121.     if (exists("%ORACLE_HOME%\DATABASE\pwdorcl.ora"))
  122.         remove_file("%ORACLE_HOME%\DATABASE\pwdorcl.ora");
  123.  
  124.     ui_action(instantiate(setting_password));
  125.     {
  126.       spawn("%ORACLE_HOME%\BIN\ORAPWD72.EXE file=%ORACLE_HOME%\DATABASE\pwdorcl.ora password=oracle");
  127.     } 
  128.         [ 'NO_RESPONSE: continue();
  129.       'INVALID_FILE_NAME, 'OS_ERROR: 
  130.       {
  131.         information_dialog(orapwd_err);
  132.       }
  133.     ]
  134.  
  135.     modify("DBA_AUTHORIZATION","oracle",ora_config,(product_filename(current_product)));
  136.  
  137.     /* Startup Database by running a script on SQL*DBA */    
  138.     ui_action(instantiate(starting_up));
  139.     sqldba_run = TRUE;
  140.     {
  141.     spawn("%ORACLE_HOME%\BIN\SQLDBA72.EXE @%RDBMS72%\ADMIN\createdb.sql");
  142.     } 
  143.     [ 'NO_RESPONSE: continue();
  144.       'INVALID_FILE_NAME, 'OS_ERROR: 
  145.       {
  146.         sqldba_run = FALSE;
  147.         information_dialog(sqldba_err);
  148.       }
  149.     ]
  150.     
  151.     err_seen = FALSE;
  152.     {
  153.     ora_err = translate("ORA", "%RDBMS72%\TRACE\build.log", "-");
  154.     err_seen=TRUE;
  155.     information_dialog(sqldba_fail);
  156.     }
  157.     [
  158.      'UNBOUND_ENVIRONMENT_VARIABLE: continue();
  159.      'OS_ERROR, 'READ_ERROR, 'INVALID_FILE_NAME, 'DEFAULT:
  160.      {
  161.         err_seen=TRUE;
  162.         information_dialog(no_build_log);
  163.      }
  164.     ]
  165.     {
  166.     if (not(err_seen))
  167.     {
  168.         dba_err = translate("DBA", "%RDBMS72%\TRACE\build.log", "-");
  169.         err_seen=TRUE;
  170.         information_dialog(sqldba_fail);    
  171.     }
  172.     }
  173.     [
  174.      'UNBOUND_ENVIRONMENT_VARIABLE: continue();
  175.      'OS_ERROR, 'READ_ERROR, 'INVALID_FILE_NAME:
  176.      {
  177.         err_seen=TRUE;
  178.         information_dialog(no_build_log);
  179.      }
  180.     ]
  181.     {
  182.     if (not(err_seen))
  183.     {
  184.         inst_err = translate("INST", "%RDBMS72%\TRACE\build.log", "-");
  185.         err_seen=TRUE;
  186.         information_dialog(sqldba_fail);    
  187.     }
  188.     }
  189.     [
  190.      'UNBOUND_ENVIRONMENT_VARIABLE: continue();
  191.      'OS_ERROR, 'READ_ERROR, 'INVALID_FILE_NAME:
  192.         information_dialog(no_build_log);
  193.     ]
  194.  
  195.     if (sqldba_run)
  196.     {
  197.     spawn("%ORACLE_HOME%\BIN\knlstop");
  198.     }
  199.     [ 'NO_RESPONSE: continue();
  200.       'INVALID_FILE_NAME, 'OS_ERROR: 
  201.       {
  202.         information_dialog(orakill_err);
  203.       }
  204.     ]
  205.  
  206.         permit_retry_operations = TRUE;    
  207.  
  208.       }      
  209.  
  210.       if (registered("w95netsrv22"))
  211.     modify("LISTENER_STARTUP","AUTO",ora_config,(product_filename(w95netsrv22)));      
  212.       modify("DATABASE_STARTUP","AUTO",ora_config,(product_filename(current_product)));
  213.  
  214.  
  215.       /*****************
  216.       Install the parent
  217.       ******************/
  218.  
  219.       if(member(selected_products, current_product))
  220.       {
  221.     if (install_parent)
  222.         install(product_parent(current_product));
  223.       }
  224.  
  225.       ui_action(instantiate(registering));
  226.       register(current_product, comment);
  227.       if (member(selected_products,current_product))
  228.     reference(current_product);
  229.  
  230.       reference(w95rsf72, current_product);
  231.       reference(w95util72, current_product);
  232.  
  233.       /* reference parent */
  234.       reference(product_parent(current_product), current_product);
  235. /* LMurphy - 07/11/95 - reference parent for util72 because if 
  236. util72 called from rdbms72 as dependent product, parent doesn't
  237. get installed (install_parent=false) before reference call in util72.ins
  238. and error caused */
  239.       reference(product_parent(current_product), w95util72);
  240.  
  241.       permit_retry_operations = FALSE;
  242.     }
  243. }
  244.